package com.wenda.homeschooedu.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.ForeignKey;

@Entity
@Table(name="inform")
public class Information extends BaseModel{
	/**
	 * 
	 */
	private static final long serialVersionUID = -2818729997475299907L;
	private int _id; 
	private String time;
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(nullable=false)
	@ForeignKey(name="class_id")
	private Classes course;
	private String title;
	private String content;
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(nullable=false)
	@ForeignKey(name="author_id")
	private Teacher author;
	private String author_name;
	private int advise;

	public int get_id() {
		return _id;
	}

	public void set_id(int _id) {
		this._id = _id;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}


	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}


	public String getAuthor_name() {
		return author_name;
	}

	public void setAuthor_name(String author_name) {
		this.author_name = author_name;
	}

	public int getEvaluation() {
		return advise;
	}

	public void setEvaluation(int evaluation) {
		this.advise = evaluation;
	}

	public Teacher getAuthor() {
		return author;
	}

	public void setAuthor(Teacher author) {
		this.author = author;
	}

	public Classes getCourse() {
		return course;
	}

	public void setCourse(Classes course) {
		this.course = course;
	}


}
